﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PhiStore.Communication;
using PhiStore.Threading;

namespace PhiStore.Actions.InternalActions
{
    internal class NegotiationWinner : PhiInternalPackage
    {
        public PeerContainer Winner;
        public NegotiationCommit Action;
        public Channel<object> ReplyChannel;

        public NegotiationWinner(PeerContainer winner, NegotiationCommit neg, Channel<object> reply)
        {
            this.Winner = winner;
            this.Action = neg;
            this.ReplyChannel = reply;
        }
        public override string ToString()
        {
            return base.ToString() + ":" + Action.Key + " winner: " + Winner.bc.ToString();
        }

    }
}
